<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>有趣的js</title>
</head>
<body>
    <h4>趣味测试：点击其他网页让标题发生变化</h4>
    <script>
        document.addEventListener('visibilitychange', function () {
        if (document.visibilityState == 'hidden') {
            normal_title = document.title;
            document.title = '人捏？快回来！';
        } else document.title = normal_title;
    });
    </script>
</body>
</html>